//========encoding:utf-8=========
/*
 * @describe:  三目运算符
 * @author:mhao
 * @copyright:chinasoft.cn
 * @date:2020年3月16日   下午10:55:14
 */
package edu.chinasoft.service;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import edu.chinasoft.domain.Dept;
import edu.chinasoft.domain.PageUnitForDept;
import edu.chinasoft.mapper.DeptMapper;

@Service("deptservice")
public class DeptServiceImp implements DeptService{
	@Autowired
	@Qualifier(value="deptMapper")
	private Logger logger = LoggerFactory.getLogger(DeptServiceImp.class);
	private DeptMapper deptMapper;
    @Override
    public
    Dept selectDeptById(Dept dept) {
        logger.info("UserServiceImp>>>selectDeptById start ……");
        Dept result=deptMapper.selectDeptById(dept);
        logger.info("UserServiceImp>>>selectDeptById end ……");
        return result;
    }
	@Override
	public Boolean insertDept(Dept dept) {
		logger.info("UserServiceImp>>>insertDept start ……");
		Boolean result=deptMapper.insertDept(dept);
        logger.info("UserServiceImp>>>insertDept end ……");
		return result;
	}
	@Override
	public Boolean updateDeptById(Dept dept) {
		logger.info("UserServiceImp>>>updateDept start ……");
		Boolean result=deptMapper.updateDeptById(dept);
		logger.info("UserServiceImp>>>updateDept end ……");
		return result;
	}
	@Override
	public Boolean deleteDeptById(Dept dept) {
		logger.info("UserServiceImp>>>deleteDeptById start ……");
		Boolean result=deptMapper.deleteDeptById(dept);
		logger.info("UserServiceImp>>>deleteDeptById end ……");
		return result;
	}	
	@Override
	public PageUnitForDept getRecordNum() {
		logger.info("UserServiceImp>>>PageUnitForDept start ……");
		PageUnitForDept recordNum=deptMapper.getRecordNum();
		logger.info("UserServiceImp>>>PageUnitForDept end ……");
		return recordNum;
	}
	@Override
	 public List<Dept> selectUnitDept(Map<String,Object> map){
        logger.info("DeptServiceImp>>>selectUnitDept start ……");
        List<Dept> deptList=deptMapper.selectUnitDept(map);
        logger.info("DeptServiceImp>>>selectUnitDept start ……");
		return null;
	}
	 @Override
	    public List<Dept> selectDept(){
	        logger.info("DeptServiceImp>>>selectUnitDept start ……");
	        List<Dept> deptList = deptMapper.selectDept();
	        logger.info("DeptServiceImp>>>selectUnitDept end ……");
	        return deptList;
	    }

}
